package com.csii.branch.activity.listener;

import com.csii.activiti.server.abstraction.constant.MessageType;
import com.csii.activiti.server.abstraction.entity.ActCallbackMessage;
import com.csii.activiti.server.core.listener.base.BaseLocalCallbackListener;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 演示回调监听
 */
@Component
@Slf4j
public class DemoEventListener implements BaseLocalCallbackListener {

    private final String flowKey="LjwXUHY_epums";


    @Override
    public String listenerFlowKey() {
        return flowKey;
    }

    @Override
    public void callback(ActCallbackMessage actCallbackMessage, MessageType messageType) {
        Map<String, Object> formData = actCallbackMessage.getFormData();
        String id = (String) formData.get("id");
        log.info("Activity callback id::::::"+id);
    }
}
